<?php
/**
 * This file is part of the Yacms (http://www.yacms.org)
 * Copyright (c) 2019 gylr0505 (http://www.yacms.org)
 *
 * Author: 鬼一浪人 <gylr0505@163.com>
 *
 * DateTime: 19-10-25 上午1:08
 * Description:
 */

include_once __DIR__.'/vendor/autoload.php';

\Swoft\Timer::tick(1, function ($timerId) {
    // To to something
    $producer = new \App\Template\Queue\Producer();
    $producer->scan('zhangshanabc');
    $producer->scan('zhangshan');
    $producer(function ($result = null){
        //do
    });
});

\Swoft\Timer::tick(1, function ($timerId) {
    // To to something
    //消费队列
    $consumer = new \App\Template\Queue\Consumer();
    $consumer->scan('zhangshanabc');
    $consumer->scan('zhangshan');
    $consumer(function ($result = null){
        //do
    });
});



